﻿using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess
{
    public class FS0102DataAccess:FSBase_DataAccess
    {
        #region 模糊检索
        public DataTable Search1(string strProjectNo)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.AppendLine("   select iAutoID,vcProjectNo from tProject  ");
            strSql.AppendLine("   where 1=1  ");
            if (!string.IsNullOrEmpty(strProjectNo))
            {
                strSql.AppendLine("   and vcProjectNo like '" + strProjectNo + "%'  ");
            }
            return Search(strSql.ToString());
        }
        #endregion

        #region 精确检索
        public DataTable Search2(string strProjectNo)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.AppendLine("   select iAutoID,vcProjectNo from tProject  ");
            strSql.AppendLine("   where vcProjectNo='" + strProjectNo + "'  ");
            return Search(strSql.ToString());
        }
        #endregion

        #region 删除
        public void Delete(List<string> Items)
        {
            StringBuilder strSql = new StringBuilder();
            foreach (var item in Items)
            {
                strSql.AppendLine("   delete tProject where iAutoID = " + item + "  ");
            }
            update(strSql.ToString());
        }
        #endregion
    }
}
